﻿/**
 * @file   FITKAbaqusAdaptorAmplitude.h
 * @brief Abaqus Amplitude 适配器 用于读取INP过程中的Amplitude解析
 * @author liuzhonghua (liuzhonghuaszch@163.com)
 * @date 2024-04-03
 */
#ifndef __FITKABAQUSADAPTORAMPLITUDE__H__
#define __FITKABAQUSADAPTORAMPLITUDE__H__

#include "FITKAbaqusAbstractAdaptor.h"
#include "FITK_Kernel/FITKAdaptor/FITKIOAdaptorFactory.h"

ForwardDeclarNS(Interface, FITKAbaAbstractAmplitude)
ForwardDeclarNS(Interface, FITKAbaAmplitudePeriodic)
ForwardDeclarNS(Interface, FITKAbaAmplitudeTabular)

namespace IO
{
    /**
     * @brief Amplitude读写适配器
     * @author liuzhonghua (liuzhonghuaszch@163.com)
     * @date 2024-04-03
     */
    class FITKAbaqusIOINPAPI FITKAbaqusAdaptorAmplitude : public FITKAbaqusAbstractAdaptor
    {
    public:
        explicit FITKAbaqusAdaptorAmplitude() = default;
        ~FITKAbaqusAdaptorAmplitude() = default;
        /**
         * @brief 获取适配器数据类型名
         * @return 适配器数据类型名
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-03-23
         */
        QString getAdaptorClass() override;

        /**
         * @brief 适配器读取
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-03-23
         */
        bool adaptR() override;

        /**
         * @brief 适配器写出
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-03-23
         */
        bool adaptW() override;

    private:
        /**
         * @brief 读取表格类型的幅值曲线
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-04-03
         */
        bool amplitudeTabularR();
        /**
         * @brief 读取周期类型的幅值曲线
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-04-03
         */
        bool amplitudePeriodicR();
        /**
         * @brief 写出表格类型的幅值曲线
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-04-03
         */
        bool amplitudeTabularW();
        /**
         * @brief 写出周期类型的幅值曲线
         * @return 状态 true成功， false失败
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-04-03
         */
        bool amplitudePeriodicW();
    };

    Register2FITKIOAdaptorFactory(INP, Interface::FITKAbaAbstractAmplitude, FITKAbaqusAdaptorAmplitude, 1)
    Register2FITKIOAdaptorFactory(INP, Interface::FITKAbaAmplitudePeriodic, FITKAbaqusAdaptorAmplitude, 2)
    Register2FITKIOAdaptorFactory(INP, Interface::FITKAbaAmplitudeTabular, FITKAbaqusAdaptorAmplitude, 3)

}


#endif // !__FITKABAQUSADAPTORAMPLITUDE__H__
